#pragma once

#include "node.h"

namespace ann
{

class node_rbf: public node
{
public:
    node_rbf(const UINT pInCnt, const EXCIT_FUNC pExFunc = &Gaussian)
    : node(pInCnt, pExFunc),
      m_ctVec(NULL),
      m_sigma(0.0),
      m_dis(0.0)
    {
        m_ctVec = new double[m_inCnt];
        std::fill(m_ctVec, m_ctVec+m_inCnt, 0.0);
    }

    virtual ~node_rbf(void)
    {
        SAFE_DELA(m_ctVec)
    }

    const double tick(const double* pInVec, const UINT pInCnt); 

public:
    const UINT UpdateW(const double pYita, const double pWeight);

public:
    ACCESSOR_IDX(m_ctVec, double)
    GETBEGIN(m_ctVec, double)
    GETENDER(m_ctVec, m_inCnt, double)
    ACCESSOR(m_sigma, double)
    GETTER(m_dis, double)

public:
    double* m_ctVec;
    double  m_sigma;
    double  m_dis;
};

}
